<div id="post_load_box">
    <div class="tt-s">
        <span>发布笔记</span>
    </div>
	<div class="field">
        <label for="" class="field-label"><span class="red">*</span>标题</label>
        <input type="text" id="post_title" placeholder="请输入标题" name="title" <?php if(!empty($post)&&!empty($post['title'])):?> value="<?php echo $post['title']?>" <?php endif;?> class="field-text" />
        <span class="error_msg"></span>
    </div>
    <div class="field">
        <label for="" class="field-label">类型</label>
        <select id="post_type">
            <option value="1">笔记</option>
            <option value="2">作品</option>
             <option value="3">技术</option>
        </select>
        <span class="error_msg"></span>
    </div>
    <div class="field">
        <label for="" class="field-label">分类</label>
        <select id="post_assort">
            <option>请选择</option>
            <?php foreach ($assort as $akey => $a):?>
               <option value="<?php echo $a['id']?>" <?php if(!empty($post)&&$a['id']==$post['assort']):?> selected="selected" <?php endif;?>><?php echo $a['caption']?></option>
            <?php endforeach;?>
        </select>
        <span class="error_msg"></span>
    </div>
    <div class="field">
        <label for="" class="field-label"><span class="red">*</span>图片(输入图片地址/上传图片)</label>
        <input  type="text" id="post_img_url" placeholder="请输入图片地址" name="image_url" value="" class="field-text" />
        <input  type="file" id="image" name="image" value="" style="display:none" />
        <div class="upload_lists upload_post_lists">
            <span md="" image_url=""  class="upload_add">
                <a class="add_item upload_post_img" href="javascript:void(0)" title="add">+</a>
            </span>
            <?php if(!empty($post)&&!empty($post['images'])):?>
            <?php 
                $image_list = explode(";", $post['images']);
            ?>
            <?php foreach($image_list as $img):?>
            <?php if(!empty($img)):?>
                <span data-src="" img_name="<?php echo $img?>" class="upload_list upload_post_list">
                    <img src="<?php echo Lib_Image::getPostImage($post['id'],$img,260) ?>" />
                    <a class="remove_item" href="javascript:void(0)" title="remove">×</a>
                </span>
            <?php endif;?>
            <?php endforeach;?>
            <?php endif;?>
            <form id="upload_post_form" method="post" enctype="multipart/form-data" action="/common/uploadfile" style="display:none;">
                <input name="upload_file" type="file" accept="image/*" id="upload_post">
                <input name="name" value="upload_file" id="upload_file_name" type="hidden">
                <input name="img_md_strs" id="img_md_strs" value="" type="hidden">
            </form>
        </div>
        <span class="error_msg"></span>
    </div>
    <div class="field">
        <label for="" class="field-label">url</label>
        <input type="text" id="post_url" placeholder="请输入url" name="url" <?php if(!empty($post)&&!empty($post['url'])):?> value="<?php echo $post['url']?>" <?php endif;?> class="field-text" />
        <span class="error_msg"></span>
    </div>
     <div class="field">
        <label for="" class="field-label">介绍</label>
        <textarea id="post_introduction" rows="8"  name="introduction" class="field-text"><?php if(!empty($post)&&$post['introduction']):?><?php echo $post['introduction']?><?php endif;?></textarea>
        <span class="error_msg"></span>
    </div>
    <div class="field">
        <label for="" class="field-label">描述</label>
        <div id="post_description" rows="8"  name="description" class="field-text"><?php if(!empty($post)&&$post['description']):?><?php echo $post['description']?><?php endif;?></div>
        <span class="error_msg"></span>
    </div>
    <div class="field">
        <label for="" class="field-label">标签</label>
        <input type="text" id="post_tags" placeholder="请输入标签" name="tags" <?php if(!empty($post)&&!empty($post['tags'])):?> value="<?php echo $post['tags']?>" <?php endif;?> class="field-text" />
        <span class="error_msg"></span>
        <div class="t_list">
            <span class="tag_list">Makeup</span>
        </div>
    </div>
    <div class="btn-container clearfix" id="post_btn">
        <input class="btn btn_transition" id="submit_post" <?php if(!empty($post)&&!empty($post['id'])):?>data-id="<?php echo $post['id']?>"<?php endif;?> type="button" value="发布">
        <input class="btn btn_transition" type="button" value="预览">
    </div>
</div>
<form id="editor_post_form" method="post" enctype="multipart/form-data" action="/common/uploadfile" style="display:none;">
    <input name="editor_upload_file" type="file" accept="image/*" id="editor_upload_post">
    <input name="name" value="editor_upload_file" id="editor_file_name" type="hidden">
</form>